package com.sixth.controller;

import com.sixth.entity.Limit;
import com.sixth.service.OutInformationService;
import com.sixth.util.CommonResult;
import com.sixth.util.LayTab;
import com.sixth.util.TableLayUi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project01
 * @description:
 * @author: 老范
 * @create: 2021-12-20 08:39
 **/
@RestController
@RequestMapping("out")
public class OutInformationController {
    @Autowired
    private OutInformationService outInformationService;

    @RequestMapping("getAllOutLibrary")
    public LayTab getAllOutLibrary(Limit limit, Integer bid) {
        return outInformationService.getAllOutLibrary(limit,bid);
    }
    //出库审核通过
    @RequestMapping("ExPass")
    public CommonResult ExPass(Integer branchid, Integer cid) {
        return outInformationService.ExPass(branchid, cid);
    }
    //出库审核驳回
    @RequestMapping("ExReject")
    public CommonResult ExReject(Integer cid, String msg) {
        return outInformationService.ExReject(cid, msg);
    }

    //获取所有的出库
    @RequestMapping("getAllOutLibrary1")
    public LayTab getAllOutLibrary1(Limit limit,Integer bid) {
        return outInformationService.getAllOutLibrary1(limit,bid);
    }
    //获取平调出库审核
    @RequestMapping("getAllTransfer")
    public LayTab getAllTransfer(Limit limit) {
        return outInformationService.getAllTransfer(limit);
    }


    //平调出库审核通过
    @RequestMapping("transferExPass")
    public CommonResult transferExPass(Integer branchid, Integer cid, Integer newbranchid) {
        return outInformationService.transferExPass(branchid, cid, newbranchid);
    }
    //平调出库审核驳回
    @RequestMapping("transferExReject")
    public CommonResult transferExReject(Integer cid, String msg) {
        return outInformationService.transferExReject(cid, msg);
    }
    //获取出库信息
    @RequestMapping("getAllTransfer1")
    public LayTab getAllTransfer1(Limit limit,Integer bid) {
        return outInformationService.getAllTransfer1(limit,bid);
    }
}
